package demo;


import demo.standard.ConcreteAggregate;
import demo.standard.IAggregate;
import demo.standard.IIterator;

public class ClientForStandard {

    public static void main(String[] args) {

        Object[] objects = {3, 4, 5};
        IAggregate aggregate = new ConcreteAggregate(objects);
        IIterator iterator = aggregate.createIterator();

        while (iterator.hasNext()) {
            System.out.println("当前是：" + iterator.getCurrent() + ",下一个是：" + iterator.getNext());
        }
    }
}
